<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1,minimum-scale=1,user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="/lib/fontawesome/css/font-awesome.css">
    <link rel="stylesheet" href="/lib/mui/css/mui.css">
    <link rel="stylesheet" href="/css/common.css">
    <link rel="stylesheet" href="/css/detail/detail.css">
</head>

<body>
    <!-- 导航栏 -->
    <header id="header" class="mui-bar mui-bar-nav">
        <h1 class="mui-title">商品详情</h1>
        <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
    </header>

    <div class="pyg_view">
        <!-- 轮播图 -->
    </div>
    <!-- 轮播图 -->
    </div>
    <!-- 尾部 -->
    <footer class="pyg_footer">
        <a href="/index.html">
            <span class="fa fa-home"></span>
            <span class="link_name">首页</span>
        </a>
        <a href="/pages/category.html">
            <span class="fa fa-list-ul"></span>
            <span class="link_name">分类</span>
        </a>
        <a class="buy_btn" href="javascript:;"></span>
            <span class="link_name">立即购买</span>
        </a>
        <a class="add_btn" href="javascript:;">
            <span class="link_name">加入购物车</span>
        </a>
    </footer>
</body>

<script src="/lib/mui/js/mui.js"></script>
<script src="/lib/arttemplate/template-web.js"></script>
<script src="/lib/zepto/zepto.js"></script>
<script src="/js/common.js"></script>
<script src="/js/detail.js"></script>

</html>

<!-- 轮播图的模板 -->
<script id="swiperTpl" type="text/html">
    <!-- 轮播图 -->
    <div class="mui-slider">
        <div class="mui-slider-group mui-slider-loop">
            <!-- 最后一张图片  -->
            <div class="mui-slider-item mui-slider-item-duplicate">
                <a href="#">
                    <img src=" {{arr.pics[arr.pics.length-1].pics_mid_url}}" /> </a>
            </div>
            {{each arr.pics value index}}
            <!--支持循环，需要重复图片节点-->
            <div class="mui-slider-item">
                <a href="#">
                    <img src="{{value.pics_mid_url}}" /> </a>
            </div>
            <!--支持循环，需要重复图片节点-->
            {{/each}}
            <!-- 第一章图片 -->
            <div class="mui-slider-item mui-slider-item-duplicate">
                <a href="#">
                    <img src="{{arr.pics[0].pics_mid_url}}" /> </a>
            </div>
        </div>

        <!-- 索引器 -->
        <div class="mui-slider-indicator">
            {{each arr.pics value index}} {{if index==0}}
            <div class="mui-indicator mui-active"></div>
            {{/if}} {{if index!=0}}
            <div class="mui-indicator"></div>
            {{/if}} {{/each}}
        </div>
    </div>
    <!-- 商品名称 -->
    <div class="name">{{arr.goods_name}}</div>
    <div class="price">￥{{arr.goods_price}}</div>
    <!-- 配送选择 -->
    <ul>
        <li>
            <span>已选</span>
            <span>白色</span>
        </li>
        <li>
            <span>促销</span>
            <span>是</span>
        </li>
        <li>
            <span>送至</span>
            <span>上海</span>
        </li>
        <li>
            <span>运费</span>
            <span>免运费</span>
        </li>
    </ul>

    <!-- 图文参数 -->
    <div class="tuwen">
        <a class="active" href="javascript:;">
            <span>图文详情</span>
        </a>
        <a href="javascript:;">
            <span>规格参数</span>
        </a>
    </div>
    <!-- 详情内容 -->
    <div id="content">
        {{@arr.goods_introduce}}
        <ul class="pyg_attr mui-control-content mui-active">
            {{each arr.attrs value2}}
            <li>
                <div class="attr_name">
                    {{value2.attr_name.split("-")[0]}}
                </div>
                <div class="attr_con">
                    <span> {{value2.attr_name.split("-")[1]}}</span>
                    <span>{{value2.attr_value}}</span>
                </div>
            </li>
            {{/each}}
        </ul>
    </div>
</script>
<!-- 轮播图的模板 -->